﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<GabageFactory.Models.stack_backwater_info>" %>
<%@ Import Namespace="System.Collections.Generic" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	进浆及回水（每日）
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="screen_area">
        <form method="Get" action="/Query/BackWater">
        <div>
        <%if ((bool)ViewData["showFactory"])
            {%>
        请选择公司：<%= Html.DropDownList("factoryId", ViewData["factories"] as List<SelectListItem>, "请选择公司", new { onchange = "showStacks();" })%>
        <span style="margin-left:20px"></span>
        <%
            }
            else
            {
        %>
        <%=Html.Hidden("factoryId", ViewData["factoryId"]) %>
        <%
            }
        %>
        <label>请选择堆场/尾矿库：</label><span id="stackList"><%= Html.DropDownList("stackId", ViewData["stacksAndTailingponds"] as List<SelectListItem>, "请选择")%></span>
        <span style="margin-left:20px"></span>
        <label>查询日期：</label><span><input type="text" name="date" id="date" size="12" value="<%=Model.date.Year %>-<%=Model.date.Month %>-<%=Model.date.Day %>" class="ipt_date" readonly="readonly" /></span>
        <span><input type="submit" value="查  询" /></span>
        </div>
        </form>
    </div>
    <div style="margin-top:10px;margin-bottom:10px"></div>
    <div id="dolphincontainer">
	    <div id="dolphinnav">
	        <ul class="top_tab">
                <li><a href="/Query/StackWater?stackId=<%=ViewData["stackId"]%>&date=<%=Model.date%>&factoryId=<%=ViewData["factoryId"] %>"><span>水位及水质</span></a></li>
                <li><a href="javascript:return(false);" class="current"><span>进浆及回水</span></a></li>
                <li><a href="/Query/Settle?stackId=<%=ViewData["stackId"]%>&date=<%=Model.date%>&factoryId=<%=ViewData["factoryId"] %>"><span>沉降及位移</span></a></li>
                <li><a href="/Query/Ardealite?stackId=<%=ViewData["stackId"]%>&date=<%=Model.date%>&factoryId=<%=ViewData["factoryId"] %>"><span>磷石膏堆积坝</span></a></li>
                <li><a href="/Query/Ditch?stackId=<%=ViewData["stackId"]%>&date=<%=Model.date%>&factoryId=<%=ViewData["factoryId"] %>"><span>截洪沟</span></a></li>
                <li><a href="/Query/PiezometerWell?stackId=<%=ViewData["stackId"]%>&date=<%=Model.date%>&factoryId=<%=ViewData["factoryId"] %>"><span>浸润线观测</span></a></li>
                <li><a href="/Query/PiezometerBase?stackId=<%=ViewData["stackId"]%>&date=<%=Model.date%>&factoryId=<%=ViewData["factoryId"] %>"><span>渗压观测</span></a></li>
                <li><a href="/Query/Drain?stackId=<%=ViewData["stackId"]%>&date=<%=Model.date%>&factoryId=<%=ViewData["factoryId"] %>"><span>导渗系统</span></a></li>
	        </ul>
	    </div>
	</div>

    <% 
        DateTime date = Model.date;
        DateTime preDate = date.AddDays(-1);
        DateTime nextDate = date.AddDays(1);
    %>

    <div class="dataarea">
        <a class="arrow_l" href="/Query/BackWater?stackId=<%=ViewData["stackId"]%>&date=<%=preDate%>&factoryId=<%=ViewData["factoryId"] %>" title="前一天">前一天</a>
        <strong><%= date.Year%>年<%=date.Month%>月<%=date.Day%>日</strong><%if (date.Date < DateTime.Now.Date){ %>
        <a class="arrow_r" href="/Query/BackWater?stackId=<%=ViewData["stackId"]%>&date=<%=nextDate%>&factoryId=<%=ViewData["factoryId"] %>" title="后一天">后一天</a><%} %>
    </div>
    


    <table cellpadding="4" cellspacing="0" class="com_from_table" style="width:756px;">

        <tr>
            <td class="lab" style="width:138px;">测量人员：</td>
            <td>
                <%
                    User tester = (User) ViewData["tester"];
                    if (tester != null)
                    {
                %>
                <%=tester.RealName + " (" + tester.Name + ")"%>
                <%
                    }
                %>&nbsp;&nbsp;
            </td>
        </tr>
    </table>
    
    <table cellpadding="4" cellspacing="0" class="com_from_table3" style="width:756px;">
        <tr>
            <th>进浆量 / 回水量</th>
        </tr>
        <tr>
            <td>
                <label>进浆量：</label>
                <em><%= Model.flow_amount%></em>
                <small><%if (Model.flow_amount.HasValue) { %> 万m<sup>3</sup>/day<%} %></small>
            </td>
        </tr>
        <tr>
            <td>
                <label>回水量：</label>
                <em><%= Model.back_water%></em>
                <small><%if (Model.back_water.HasValue) { %> 万m<sup>3</sup>/day<%} %></small>
            </td>
        </tr>
        <tr>
            <td>
                <label>进浆点：</label>
                        <span style="padding-left:2.5em;"> <%if (Model.flow_point != 0 && Model.flow_point.HasValue) { %> <%=Model.flow_point%>号<%} else {%>其它 (<%=Model.flow_point_other%>)<%} %></span>
            </td>
        </tr>
    </table>
    
    
    <table cellpadding="4" cellspacing="0" class="com_from_table3" style="width:756px;">
        <tr>
            <th colspan="2">库区回水方式</th>
        </tr>
        <tr>
            <td colspan="2"><input type="checkbox" value="1" name="drainage_slides" disabled="disabled" <%if (Model.drainage_slides == 1){ %> checked="checked" style="display:none;" /><span style="font-weight:bold; padding-left:0.5em;">排水斜槽：</span><span style="font-weight:bold;color:red; padding-left:0.5em;">&nbsp;&nbsp;&nbsp;&nbsp;启用</span> <%} else {%> style="display:none;" /><span style="font-weight:bold;padding-left:0.5em;">排水斜槽：</span><span style="padding-left:0.5em;">&nbsp;&nbsp;&nbsp;&nbsp;未启用</span><% } %></td>
        </tr>
        <tr>
            <td style="width:360px;">
                <label>入水水深：</label>
                <em><%if (Model.slide_depth.HasValue && Model.drainage_slides == 1) { %><%= Model.slide_depth%> <%} else { %> - <% } %>   </em> 
                <small><%if (Model.slide_depth.HasValue && Model.drainage_slides == 1) {%> m<%} %></small>
            </td>
            <td>
                <label>入水宽度：</label>
                <em><%if (Model.slide_width.HasValue && Model.drainage_slides == 1) { %><%= Model.slide_width%> <%} else { %> - <% } %>   </em>
                <small><%if (Model.slide_width.HasValue && Model.drainage_slides == 1) { %> m<%} %></small>
            </td>
        </tr>
        <tr>
            <td>
                <label>水下盖板是否覆盖：</label>
                <em><%if (Model.drainage_slides == 1){if (Model.is_covered == 1){%> 是 <% } else { %> 否 <% } }else{%> - <% } %>  </em>
            </td>
            <td>
                <label>防腐层是否完整：</label>
                <em><%if (Model.drainage_slides == 1){if (Model.is_complete == 1){%> 是 <% } else { %> 否 <% } }else{%> - <% } %>  </em>
            </td>
        </tr>
        <tr>
            <td colspan="2"><input type="checkbox" value="1" name="siphon" disabled="disabled" <%if (Model.siphon == 1){ %> checked="checked" style="display:none;" /><span style="font-weight:bold; padding-left:0.5em;">虹吸管：</span><span style="font-weight:bold;color:red; padding-left:0.5em;">&nbsp;&nbsp;&nbsp;&nbsp;启用</span> <%} else {%> style="display:none;" /><span style="font-weight:bold;padding-left:0.5em;">虹吸管：</span><span style="padding-left:0.5em;">&nbsp;&nbsp;&nbsp;&nbsp;未启用</span><% } %></td>
        </tr>
        <tr>
            <td>
                <label>虹吸流量：</label>
                <em><%if (Model.siphon_flow.HasValue && Model.siphon == 1) { %><%= Model.siphon_flow%> <%} else { %> - <% } %>   </em> 
                <small><%if (Model.siphon_flow.HasValue && Model.siphon == 1) { %> m<sup>3</sup>/hr<%} %></small>
            </td>
            <td>
                <label>虹吸管径：</label>
                <em><%if (Model.siphon == 1) { %><%= Model.siphon_caliber%> <%} else { %> - <% } %>   </em>
                <small><%if (Model.siphon == 1) {%> mm<%}%></small>
            </td>
        </tr>
        <tr>
            <td>
                <label>虹吸口入口高程：</label>
                <em><%if (Model.siphon_in_El.HasValue && Model.siphon == 1) { %><%= Model.siphon_in_El%> <%} else { %> - <% } %>   </em> 
                <small><%if (Model.siphon_in_El.HasValue && Model.siphon == 1) { %> m<%} %></small>
            </td>
            <td>
                <label>虹吸口出口高程：</label>
                <em><%if (Model.siphon_out_El.HasValue && Model.siphon == 1) { %><%= Model.siphon_out_El%> <%} else { %> - <% } %>   </em>  
                <small><%if (Model.siphon_out_El.HasValue && Model.siphon == 1) { %> m<%} %></small>
            </td>
        </tr>
        <tr>
            <td>
                <label>虹吸管长度：</label>
                <em><%if (Model.siphon_length.HasValue && Model.siphon == 1) { %><%= Model.siphon_length%> <%} else { %> - <% } %>   </em>
                <small><%if (Model.siphon_length.HasValue && Model.siphon == 1) { %> m<%} %></small>
            </td>
            <td>
                <label></label>
                <em></em>
                <small></small>
            </td>
        </tr>
        <tr>
            <td colspan="2"><input type="checkbox" value="1" disabled="disabled" name="movable_flow_shaft" <%if (Model.movable_flow_shaft == 1){ %> checked="checked" style="display:none;" /><span style="font-weight:bold; padding-left:0.5em;">移动式排洪竖井：</span><span style="font-weight:bold;color:red; padding-left:0.5em;">&nbsp;&nbsp;&nbsp;&nbsp;启用</span> <%} else {%> style="display:none;" /><span style="font-weight:bold;padding-left:0.5em;">移动式排洪竖井：</span><span style="padding-left:0.5em;">&nbsp;&nbsp;&nbsp;&nbsp;未启用</span><% } %></td>
        </tr>
    </table>




    <fieldset class="tf_style">
        <legend>当日情况补充：</legend>
        <p style="padding-left:5px"><%=string.IsNullOrEmpty(Model.description) ? "无" : Model.description%></p>
    </fieldset>
    <script type="text/javascript" language="javascript">
        $('#date').datepicker({ changeMonth: true, changeYear: true });

        function showStacks() {
            var factoryId = document.getElementById("factoryId").value;
            if (factoryId == "" || factoryId == 0) return;
            $.ajax({ 
                    type: "POST",
                    url: "<%=Url.Content("~/Modification/ListStacks") %>",
                    data: "factoryId=" + factoryId,
                    success: function (data) { $("#stackList").html(data);}
            });
        }
    </script>
</asp:Content>
